import parse from "url-parse";

export async function getUploadUrl(fileName) {
  // TODO: 获取上传地址
  return `${process.env.VUE_APP_BASE_API}/upload/${fileName}`;
}

export async function getImageUrl(pathUrl) {
  // TODO: 获取图片地址
  return pathUrl;
}

export async function multiTransfromUrl(images, key = "url") {
  for (let i = 0; i < images.length; i++) {
    images[i][key] = await getImageUrl(images[i][key]);
  }
}
